package com.molihub.service.impl;

import com.molihub.entity.User;
import com.molihub.entity.UserFollow;
import com.molihub.service.UserFollowService;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @ClassName: UserFollowServiceImpl
 * @Description: 处理好友、关注相关的业务实现层
 * @author: GGBOY
 * @date 2020/1/31 14:15
 * @Version: 1.0
 **/
@Service
public class UserFollowServiceImpl extends BaseService implements UserFollowService {
    @Override
    public Integer addRecord(UserFollow userFollow) {
        return  userFollowMapper.addRecord(userFollow);
    }

    @Override
    public UserFollow findRecordById(Integer userId, Integer followUserId) {
            return userFollowMapper.findRecordById(userId, followUserId);
    }

    @Override
    public List<User> findAllFriendById(Integer userId) {
        return userFollowMapper.findAllFriendById(userId);
    }

    @Override
    public Integer getFriendsCount(Integer userId) {
        return userFollowMapper.getFriendsCount(userId);
    }

    @Override
    public List<UserFollow> findAllRecordById(Integer userId) {
        return userFollowMapper.findAllRecordById(userId);
    }


}
